package com.woniu.api;

import com.woniu.dto.HisPrescriptionDto;
import com.woniu.dto.PageDTO;
import com.woniu.param.AddByIdHisPrescriptionParam;
import com.woniu.param.AddHisPrescriptionParam;
import com.woniu.param.ListHisPrescriptionParam;
import com.woniu.param.ModifyHisPrescriptionParam;
import com.woniu.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@FeignClient(
        contextId = "patient-4",
        value = "patient",
        path = "/patient"
)
@Api(tags = "患者用药表接口")
public interface HisPrescriptionQueryApi {
    //新增用药表
    @PostMapping("adddrugs")
    @ApiOperation("新增用药表")
    Result<List<HisPrescriptionDto>> newDrugs(@RequestBody AddByIdHisPrescriptionParam addByIdHisPrescriptionParam);

    //删除用药表
    @ApiOperation("删除用药表")
    @DeleteMapping("deleteprescription")

    Result<Boolean> deleteMedication(@RequestParam("ids") ArrayList<Integer> ids);

    //修改用药表
    @PutMapping("modifyprescriptionstatus")
    @ApiOperation("修改用药缴费状态方法")
    Result<Boolean> modifyMedication(@RequestBody ModifyHisPrescriptionParam modifyHisPrescriptionParam);

    @PutMapping("modifyprescription")
    @ApiOperation("修改用药领药状态方法")
    Result<Boolean> receivingMedicine(@RequestBody ModifyHisPrescriptionParam modifyHisPrescriptionParam);
    //查询用药表
    @ApiOperation("查询用药表")
    @GetMapping("getprescription")

    Result<PageDTO<HisPrescriptionDto>> queryMedication(@RequestBody ListHisPrescriptionParam listHisPrescriptionParam);
}
